<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>Seleziona Hotel modifica</title>
	<link rel="stylesheet" type="text/css" href="../styles/style.css" />
</h:head>
<h:body>
<div id="container">
<div id="box">

<header class="banner">
<span id="titoloPagina"> Seleziona l'Hotel che vuoi modificare </span>
</header>

<div id="externalborder1">
<p:spacer height="40px" />


<h:form id="form"> 
      
      <p:growl id="growl" showDetail="true" sticky="true" />

			<h:panelGroup  rendered="#{param.noIst}">
			<div id="infoAgg" style="text-align: center;"><h:outputText value="Non hai selezionato nessun elemento"/><br/>
			</div>
			</h:panelGroup>
			<p:spacer height="40px" />
			
<div id="externalborderTab"> 
		<p:dataTable id="selezionoLeEscursioni" var="elementoDTO" rowKey="#{elementoDTO.idElemento}" value="#{creaIstanze.elementi}" paginator="true" 
                 selection="#{creaIstanze.elemento}" selectionMode="single" sortMode="multiple"  rows="7" style="text-align:center;">  

		
		<p:ajax event="rowSelect" update=":form:growl" listener="#{creaIstanze.onRowSelectElemento}"/>
		
			<p:column id="nome" sortBy="nome" headerText="Nome">  
	            <h:outputText value="#{elementoDTO.nome}" />  
	        </p:column>
	        
	        <p:column id="citta" sortBy="città" headerText="Città">  
	            <h:outputText value="#{elementoDTO.città}" />  
	        </p:column>  
	  
	        <p:column id="descrizione" sortBy="descrizione" headerText="Numero Stelle">  
	            <h:outputText value="#{elementoDTO.descrizione}" />  
	        </p:column>  
	  
	        <p:column id="multy" sortBy="multy" headerText="Tipo Stanza">  
	            <h:outputText value="#{elementoDTO.multy}" />  
	        </p:column>  
	           
	    </p:dataTable>
    </div>
     

    
</h:form>

     <p:spacer height="40px"/>
<h:form>

 <div id="columnBox" style="margin:0px auto; width:70%">
	
	<div id="column1" style="float:left; margin:0; margin-left:107px/*111.5px*/;">
<a id="registerlink" href="modElemento.xhtml">
					<div class = "button" id = "indietro">
						Indietro
					</div>
				</a>
</div>

<div id="column2" style="float:left; margin:0;/*margin-left:111.5px*/;">
<div class="padder" id="padder">
</div>
</div>

<div id="column3" style="float:left; margin:0;/*margin-left:111.5px*/;">
	<div id="registerButton">
		<h:commandLink id="visualizzalink" action="#{creaIstanze.controlloSelezioneElementoMod('selezioneHotelBis')}">
<div class="button" id="visualizza">
Modifica Hotel
</div>
</h:commandLink>
	
	<!--  il vecchio era un a-link con href=modificaDescEl -->

</div>

				</div>
				</div>
				

<!-- 
<div id="centerbutton">
				<a id="visualizzalink" href="modificaHotel.xhtml">
					<div class = "button" id = "visualizza">
						Modifica Hotel
					</div>
				</a>
			</div>-->
</h:form>
</div>
</div>
<div id="push">
</div>
</div>

<div id="footer">
<h:button id="homepage" value="Homepage" outcome="index.xhtml"></h:button>
</div>

</h:body>
    
</html>